<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--列表-->
<table class="table mb-15 table-hover">
    <thead>
    <tr>
        <th>序号</th>
        <th>角色名称</th>
        <th>角色备注</th>
        <th>创建时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${datalist.list}" var="role" varStatus="i">
        <tr class="cen">
            <td>${i.index+1}</td>
            <td>${role.name}</td>
            <td>${role.description}</td>
            <td>${role.createtime}</td>
            <td>
                <a title="详情" class="mr-5" onclick="showRole('${role.sysid}')">详情</a>
                <a title="修改" class="mr-5" onclick="addOrUpdateRole('${role.sysid}')">修改</a>
                <a title="分配资源" class="mr-5" onclick="assignPowers('${role.sysid}')">分配资源</a>
                <a title="删除" onclick="deleteRole('${role.sysid}')">删除</a>
            </td>
        </tr>
    </c:forEach>


    </tbody>
</table>

<!--分页-->
<div class="panel panel-default">
    <div class="panel-bd">
        <div class="pagination"></div>
    </div>
</div>

<script type="text/javascript">
    /*
     分页
     * */
    $(".pagination").createPage({
        pageCount: '${datalist.pages}',
        current: '${datalist.pageNum}',
        dataTotal: '${datalist.total}',
        backFn: function (p) {
            go_page(p);
        }
    });
</script>
